package mylittleinvestigations.EasingFunctions;

public class GravityBounceEase extends EasingFunction
{
    public GravityBounceEase(double startValue, double endValue, int msDuration)
    {
        super(startValue, endValue, msDuration);
    }

    protected double GetNormalizedValue(double normalizedTime)
    {
        if (normalizedTime < 0.5)
        {
            return 4 * normalizedTime * normalizedTime;
        }
        else
        {
            return 4 * (normalizedTime - 1) * (normalizedTime - 1);
        }
    }
}